<article class="ui attached segment card dream-card">
  <a class="image" href="{{ .Permalink }}">
    {{ if isset .Params "cover" }}
      <img src="{{ .Params.cover }}" alt="{{ .Title }}" />
    {{ else }}
      <img src="/img/default{{ index (shuffle (seq 1 4)) 0 }}.jpg" alt="{{ .Title }}" />
    {{ end }}
  </a>

  <div class="content">
    <h2 class="ui medium header">
      <a href="{{ .Permalink }}">{{ .Title }}</a>
    </h2>
    <div class="meta">
      <p class="date">
        {{ if eq .Site.Language.Lang "zh" }}
          {{ index .Site.Data.zh.Weekday (printf "%d" .Date.Weekday) }}，{{ index .Site.Data.zh.Month (printf "%d" .Date.Month) }} {{ .Date.Day }} 日，{{ .Date.Year }} 年
        {{ else if eq .Site.Language.Lang "es" }}
          {{ index .Site.Data.es.Weekday (printf "%d" .Date.Weekday) }}, {{ .Date.Day }} de {{ index .Site.Data.es.Month (printf "%d" .Date.Month) }} de {{ .Date.Year }}
        {{ else }}
          {{ .Date.Format "Monday, Jan 2, 2006" }}
        {{ end }}
      </p>
      <p class="author">
        @
        {{ if isset .Params "author" }}
          {{ if isset .Params "authorlink" }}
            <a href="{{ .Params.authorlink }}" target="_blank">{{ .Params.author }}</a>
          {{ else }}
            {{ .Params.author }}
          {{ end }}
        {{ else }}
          {{ .Site.Params.author }}
        {{ end }}
      </p>
    </div>
    <div class="description">
      {{ .Summary | safeHTML }}
    </div>
  </div>

  <div class="extra content">
    <a>
      <i class="clock icon"></i>
      {{ .ReadingTime }}{{ i18n "minuteRead" }}
    </a>
  </div>
</article>
